<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    <div class='form-group '>
        <label class="control-label col-xs-12 col-sm-2">{:__('Kind')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--selectpicker-->
            <select id="c-kind" data-rule="required" class="form-control " name="row[kind]">
                {foreach name="kindList" item="vo"}
                <option value="{$key}" {in name="key" value="$Think.get.kind"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Parent_id')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-parent_id" data-rule="required" class="form-control " name="row[parent_id]">
                <option value="0" selected>无</option>
                {foreach name="parentList" item="vo"}
                <option data-type="{$vo.kind}" value="{$vo.id}">{$vo.name}</option>
                {/foreach}
            </select>

            <select id="c-parent_id_t" data-rule="required" style="margin-top: 10px;" class="form-control " name="row[parent_id_t]">
                <option value="0" selected>无</option>

            </select>
            <!--<input id="c-parent_id" data-source="cate/index" class="form-control selectpage" name="row[parent_id]"
                   type="text" value="">-->
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Icon')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-icon" class="form-control" name="row[icon]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-icon" class="btn btn-danger plupload" data-input-id="c-icon" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-icon"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-icon" class="btn btn-primary fachoose" data-input-id="c-icon" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-icon"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-icon"></ul>
        </div>
    </div>-->
    <div class="form-group uses">
        <label class="control-label col-xs-12 col-sm-2">{:__('uses')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!-- <div class="radio">
                {foreach name="usesList" item="vo"}
                <label for="row[uses]-{$key}">
                    <input id="row[uses]-{$key}" name="row[uses]" type="radio" value="{$key}" {in name="key" value="ALL" }checked{/in} />
                    {$vo}</label>
                {/foreach}
            </div> -->
            <input  class="form-control" name="row[school_ids]" type="hidden" value="{$schoolList['ids']|htmlentities}">

            <input id="c-school-ids" placeholder="请选择可用学校，如不选择默认全部可用" class="form-control" name="row[school_name]" type="text" value="{$schoolList['names']|htmlentities}">
        
        </div>
    </div>
    <!-- 是否默认 -->
    <div class="form-group uses">
        <label class="control-label col-xs-12 col-sm-2">{:__('IS_DEFAULT')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="defaultList" item="vo"}
                <label for="row[is_default]-{$key}">
                    <input id="row[is_default]-{$key}" name="row[is_default]" type="radio" value="{$key}" {in name="key" value="NO" }checked{/in} />
                    {$vo}</label>
                {/foreach}
            </div>
        </div>
    </div>
    <!-- 是否可删除 -->
    <div class="form-group uses">
        <label class="control-label col-xs-12 col-sm-2">{:__('IS_DELETE')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="deleteList" item="vo"}
                <label for="row[is_delete]-{$key}">
                    <input id="row[is_delete]-{$key}" name="row[is_delete]" type="radio" value="{$key}" {in name="key" value="NO" }checked{/in} />
                    {$vo}</label>
                {/foreach}
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sort" data-rule="required" class="form-control" name="row[sort]" type="number" value="1">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-remark" class="form-control " name="row[remark]"></textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
